import {messages} from "share/common";
import React, { Component } from "react"
import { AdvancedTable } from "components/index"
import { Alert } from 'antd'
import httpFetch from "share/httpFetch"
import DataHoc from "../template/data-hoc"

@DataHoc
class ExpenseReviewBacklash extends Component {

  service = (page, size, searchParams) => {
    return httpFetch.post(`/api/bill/recoil/info?page=${page}&size=${size}`, searchParams)
  };

  render() {
    const { getColumns, getSearchForm } = this.props;
    return (
      <AdvancedTable
        index
        tableName={'expense-review-backlash'}
        title={messages('expense-14.key461')/*【报销单】可反冲*/}
        onRef={ref => this.advancedTableRef = ref}
        service={this.service}
        columns={getColumns('backlash', 1002)}
        searchForm={getSearchForm('backlash', 1002)}
        pinnedList={['formOIDs', 'businessCode', 'financeApproval']}
      >
        <Alert
          showIcon
          type={'info'}
          style={{ width: 'calc(100% - 100px)' }}
          message={messages('expense-14.key462')/*针对审核通过报销单的反冲，系统默认删除原报销单生成的凭证，若您不希望删除原凭证，需要生成反冲凭证，请前往“财务管理-核算设置-核算基础配置”，设置反冲方式及反冲凭证类型。*/}
        />
      </AdvancedTable>
    )
  }

}

export default ExpenseReviewBacklash

